package in.muton.edushare.pages.cp.courseFBCP;

import in.muton.edushare.pages.common.EdusharePanel;
import in.muton.edushare.poll.panels.IPollPanelContainer;
import in.muton.edushare.poll.sections.PollEditPanel;

import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.IModel;

import com.edushare.common.vo.Poll;

public class PollEditPanelWrapper extends EdusharePanel {
	public PollEditPanelWrapper(String id, IModel<Poll> model,
			final CourseFeedbackPage page, final IPollPanelContainer container) {
		super(id, model, page);
		add(new Link<Void>("importPoll") {
			@Override
			public void onClick() {
				((PollCreationPanel) container)
						.setActivePanel(PollCreationPanel.SHOW_IMPORT_EXISTING_PANEL);
			}

			private static final long serialVersionUID = 2162652052758189085L;
		});
		add(new PollEditPanel("subpanel", model, page, container));
	}

	private static final long serialVersionUID = -1984453281054893485L;
}
